package com.zhanglifan.service.impl;

import com.zhanglifan.domain.User;
import com.zhanglifan.service.UserService;

import java.util.List;

/**
 * Information
 * Author: ZhangLifan
 * Time: 2017/9/23 22:02
 * Description: UserServiceImpl
 */
public class UserServiceImpl extends BaseServiceImpl implements UserService {

    @Override
    public User findUserByUserName(String userName) {
        List<User> list = baseDao.find("from User where userName=?", User.class, new Object[]{userName});
        return list.size()==0 ? null : list.get(0);
    }
}
